package com.example.flowabledemo.data.dto;

import java.io.Serializable;
import lombok.Data;

@Data
public class ResponseResult<T> implements Serializable {

  private static final long serialVersionUID = 123L;
  private Integer code;
  private String message;
  private T data;

  public ResponseResult() {
    super();
  }

  public ResponseResult(Integer code) {
    super();
    this.code = code;
  }

  public ResponseResult(Integer code, String message) {
    super();
    this.code = code;
    this.message = message;
  }

  public ResponseResult(Integer code, Throwable throwable) {
    super();
    this.code = code;
    this.message = throwable.getMessage();
  }

  public ResponseResult(Integer code, T data) {
    super();
    this.code = code;
    this.data = data;
  }

  public ResponseResult(Integer code, String message, T data) {
    super();
    this.code = code;
    this.message = message;
    this.data = data;
  }

}
